package com.irdstudio.efp.e4a.service.facade;

import java.util.List;

import com.irdstudio.efp.e4a.service.vo.SRuleCollVO;
import com.irdstudio.basic.framework.core.base.DataOptionalAuthority;

/**
 * <p>
 * Description:系统规则集表
 * <p>
 * 
 * @author Cytus_
 * @date 2018-05-03
 */
public interface SRuleCollService extends DataOptionalAuthority {

	public List<SRuleCollVO> queryAllOwner(SRuleCollVO sRuleCollVo);

	public List<SRuleCollVO> queryAllCurrOrg(SRuleCollVO sRuleCollVo);

	public List<SRuleCollVO> queryAllCurrDownOrg(SRuleCollVO sRuleCollVo);

	/**
	 * 
	 * @param vo
	 * @return -3: 当前规则集类型已存在生效的省级配置
	 */
	public int insertSRuleColl(SRuleCollVO vo);

	public int deleteByPk(SRuleCollVO sRuleCollVo);

	public int updateByPk(SRuleCollVO sRuleCollVo);

	public SRuleCollVO queryByPk(SRuleCollVO sRuleCollVo);

	/**
	 * 插入规则集,并返回这个对象 (PS: 如果不return 这个对象, ruleCollId 会为空!)
	 * 
	 * @param sRuleCollVo
	 * @return total=-3: 当前规则集类型已存在生效的省级配置
	 */
	public SRuleCollVO insertSRuleCollBack(SRuleCollVO sRuleCollVo);

	/**
	 * 提交规则集
	 * 
	 * @param sRuleCollVo
	 * @return -4: 存在相关参数配置未完成
	 */
	public int submitSRuleColl(SRuleCollVO sRuleCollVo);

	/**
	 * 失效规则集
	 * 
	 * @return
	 */
	public int disableSRuleColl(SRuleCollVO sRuleCollVo);

	/**
	 * 根据规则类型和法人机构码查询生效的规则集
	 * 
	 * @param sRuleCollVO
	 * @return
	 */
	public List<SRuleCollVO> queryRuleCollByTypeLegal(SRuleCollVO sRuleCollVo);

	/**
	 * 根据规则类型查询生效的省级配置
	 * 
	 * @param sRuleCollVo
	 * @return
	 */
	public SRuleCollVO queryProvinceRuleCollByType(SRuleCollVO sRuleCollVo);

	/**
	 * 通过规则集ID 复制一个新的规则集
	 * 
	 * @param ruleCollId
	 * @return
	 */
	public int copyRuleCollById(SRuleCollVO sRuleCollVo);
}
